function Get-InsightPlacement {
    [CmdletBinding()]
    [OutputType('string')]
    param (
        [Parameter(Mandatory = $true)][OnPremOrAzure]$CentralPlacement,
        [Parameter(Mandatory = $false)][string]$InsightPlacement,
        [Parameter(Mandatory = $false)][bool]$ConfirmAll = $false
    )

    # Allow user to use existing value or to update it.
    if ((Confirm-SingleValue -Description 'LS Insight placement' -Value $InsightPlacement -ConfirmAll $ConfirmAll) -eq $true) { return $InsightPlacement }

    # LS Insight cannot be on-premises if the LS Central instance is SaaS.
    $DestinationOptions = if ($CentralPlacement -eq 'On_Premises') {
        @(
            'On_Premises',
            'In_Azure'
        )
    } else {
        @(
            'In_Azure'
        )
    }

    # Ask user.
    Write-Host # Newline.
    $params = @{
        Question = 'Select where you want to host the LS Insight database:'
        Options = $DestinationOptions
    }
    $InsightPlacement = Open-LSQuestion @params

    return $InsightPlacement
}